package org.itzixi.tasks;

import jakarta.annotation.Resource;
import org.itzixi.utils.SMSUtils;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

@EnableAsync
@Component
public class SMSTask {
    @Resource
    private SMSUtils smsUtils;

    @Async("threadPoolExecutor")
    public void sendSMS(String phone, String code) throws Exception {
        smsUtils.sendSMS(phone, code);
    }


}
